package com.gccloud.design.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gccloud.design.dto.SdFormActionConfDto;
import com.gccloud.design.dto.SdFormConfigDto;
import com.gccloud.design.entity.SdFormActionConfEntity;
import com.gccloud.design.entity.SdFormFlowRepoBindEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author wu.yumin
 * @version 1.0.0
 * @Description 表单操作配置dao
 * @date 2021/6/22 20:40
 */
@Mapper
public interface SdFormActionConfigDao extends BaseMapper<SdFormActionConfEntity> {

    /**
     * 查询表单按钮配置
     *
     * @param formId 表单标识
     * @return 列表
     */
    List<SdFormActionConfDto> getActionByFormId(Long formId);

    /**
     * 表单环节绑定
     */
    int saveFormFlowRepoBind(@Param("entity") SdFormFlowRepoBindEntity entity);

    /**
     * 根据表单id查询表单环节绑定信息
     */
    SdFormConfigDto queryFormRepoInfo(Long formId);

    /**
     * 修改表单环节绑定信息
     */
    int updateFormRepoByRepoId(@Param("entity") SdFormFlowRepoBindEntity entity);

    /**
     * 删除表单绑定环节
     */
    int deleteRepoByRepoId(String repoId);
}
